import CryptoJS from 'crypto-js'

const secretKey = "CqXsZhjd@202406=";

/**
 * 解密数据
 * @param encryptedData
 * @param secretKey
 * @returns {string}
 */
export function decryptData(data) {
  var result = CryptoJS.AES.decrypt(data, CryptoJS.enc.Utf8.parse(secretKey), {
    mode: CryptoJS.mode.ECB,
    padding: CryptoJS.pad.Pkcs7,
  })
  return CryptoJS.enc.Utf8.stringify(result).toString();
}
